ddd8c9ef974c14911df2a851a955ba9d98938889,processing/src/main/java/io/druid/segment/filter/LikeFilter.java,LikeFilter,getBitmapIndex,#BitmapIndexSelector#,54
Before Change
// Union bitmaps for all matching dimension values in range.
// Use lazy iterator to allow unioning bitmaps one by one and avoid materializing all of them at once.
return selector.getBitmapFactory().union(
new Iterable<ImmutableBitmap>()
{
@Override
public Iterator<ImmutableBitmap> iterator()
{
return new Iterator<ImmutableBitmap>()
{
int currIndex = startIndex;
@Override
public boolean hasNext()
{
return currIndex < endIndex;
}
@Override
public ImmutableBitmap next()
{
while (currIndex < endIndex && !likeMatcher.matchesSuffixOnly(dimValues, currIndex)) {
currIndex++;
}
if (currIndex == endIndex) {
return bitmapIndex.getBitmapFactory().makeEmptyImmutableBitmap();
}
return bitmapIndex.getBitmap(currIndex++);
}
@Override
public void remove()
{
throw new UnsupportedOperationException();
}
};
}
}
);
} else {
// fallback
return Filters.matchPredicate(
After Change
// Union bitmaps for all matching dimension values in range.
// Use lazy iterator to allow unioning bitmaps one by one and avoid materializing all of them at once.
return selector.getBitmapFactory().union(getBitmapIterator(bitmapIndex, likeMatcher, dimValues));
} else {
// fallback
return Filters.matchPredicate(